package org.suk.dp.responsibilityChain.example;

import java.util.ArrayList;
import java.util.List;

/**
 * Description: <br/>
 * @version V1.0  2017/6/22 10:51  by 石冬冬(dongdong.shi@ucarinc.com) - Heil Hitler
 */
public class Client {
    public static void main(String[] args) {
        Manager chris = new CommonManager("克里斯");
        Manager linda = new Majordomo("琳达");
        Manager sollam = new GeneralManager("索拉姆");
        chris.setSuperior(linda);
        linda.setSuperior(sollam);

        List<Request> requestList = new ArrayList<Request>(){{
            add(new Request(Request.RequestTypeEnum.LEAVE,"小菜请假",1));
            add(new Request(Request.RequestTypeEnum.LEAVE,"小菜请假",4));
            add(new Request(Request.RequestTypeEnum.SALARY,"小菜请求加薪",500));
            add(new Request(Request.RequestTypeEnum.SALARY,"小菜请求加薪",1000));
        }};
        for(Request request : requestList){
            sollam.requestApplications(request);
        }
    }
}
